//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.smartstate.dataManagement.util;

import java.io.Serializable;

public class LoginParameterUtil implements Serializable {
    private static final long serialVersionUID = 1L;
    public static volatile ThreadLocal<LoginParameter> loginParameterThreadLocal = new ThreadLocal();

    public LoginParameterUtil() {
    }

    public static LoginParameter getUserSession() {
        return (LoginParameter)loginParameterThreadLocal.get();
    }

    public static void setUserSession(LoginParameter loginParameter) {
        loginParameterThreadLocal.set(loginParameter);
    }

    public static void setUserSession(String userId, String enterpriseId) {
        LoginParameter loginParameter = new LoginParameter(userId, enterpriseId);
        loginParameterThreadLocal.set(loginParameter);
    }

    public static void removeUserSession() {
        loginParameterThreadLocal.remove();
    }

    public static class LoginParameter {
        private String userId;
        private String enterpriseId;
        private Long startTime;

        public LoginParameter(String userId, String enterpriseId) {
            this.userId = userId;
            this.enterpriseId = enterpriseId;
        }

        public String getUserId() {
            return this.userId;
        }

        public String getEnterpriseId() {
            return this.enterpriseId;
        }

        public Long getStartTime() {
            return this.startTime;
        }

        public void setUserId(final String userId) {
            this.userId = userId;
        }

        public void setEnterpriseId(final String enterpriseId) {
            this.enterpriseId = enterpriseId;
        }

        public void setStartTime(final Long startTime) {
            this.startTime = startTime;
        }

        public boolean equals(final Object o) {
            if (o == this) {
                return true;
            } else if (!(o instanceof LoginParameter)) {
                return false;
            } else {
                LoginParameter other = (LoginParameter)o;
                if (!other.canEqual(this)) {
                    return false;
                } else {
                    label47: {
                        Object this$startTime = this.getStartTime();
                        Object other$startTime = other.getStartTime();
                        if (this$startTime == null) {
                            if (other$startTime == null) {
                                break label47;
                            }
                        } else if (this$startTime.equals(other$startTime)) {
                            break label47;
                        }

                        return false;
                    }

                    Object this$userId = this.getUserId();
                    Object other$userId = other.getUserId();
                    if (this$userId == null) {
                        if (other$userId != null) {
                            return false;
                        }
                    } else if (!this$userId.equals(other$userId)) {
                        return false;
                    }

                    Object this$enterpriseId = this.getEnterpriseId();
                    Object other$enterpriseId = other.getEnterpriseId();
                    if (this$enterpriseId == null) {
                        if (other$enterpriseId != null) {
                            return false;
                        }
                    } else if (!this$enterpriseId.equals(other$enterpriseId)) {
                        return false;
                    }

                    return true;
                }
            }
        }

        protected boolean canEqual(final Object other) {
            return other instanceof LoginParameter;
        }

        public int hashCode() {
//            int PRIME = true;
            int result = 1;
            Object $startTime = this.getStartTime();
            result = result * 59 + ($startTime == null ? 43 : $startTime.hashCode());
            Object $userId = this.getUserId();
            result = result * 59 + ($userId == null ? 43 : $userId.hashCode());
            Object $enterpriseId = this.getEnterpriseId();
            result = result * 59 + ($enterpriseId == null ? 43 : $enterpriseId.hashCode());
            return result;
        }

        public String toString() {
            String var10000 = this.getUserId();
            return "LoginParameterUtil.LoginParameter(userId=" + var10000 + ", enterpriseId=" + this.getEnterpriseId() + ", startTime=" + this.getStartTime() + ")";
        }

        public LoginParameter(final String userId, final String enterpriseId, final Long startTime) {
            this.userId = userId;
            this.enterpriseId = enterpriseId;
            this.startTime = startTime;
        }
    }
}
